package org.offsync.rich

import org.offsync.util.Time

case class RichObject(val obj: Object) {
  def wait(
      deadline: Time) = {
    val duration = deadline.timeLeft
    if (duration.nanoseconds > 0) {
      obj.wait(duration.milliseconds, duration.nanoPart)
    }
  }
}
